#include "BLE.h"
#include <SoftwareSerial.h>
SoftwareSerial mySerial(4, 5);  //根据实际模块上的跳线，选择对应端口
String currentInfo = "";


int com;
void BLE_Init()
{
  my_Serial.begin(9600);
  Serial.begin(9600);
}
int ComAnalysis()
{
  if (my_Serial.available() > 0)
  {
    currentInfo = my_Serial.readStringUntil('\n'); //接收手机发送的数据
    if (currentInfo == "1")
     com=1;
    else if (currentInfo == "2")
      com=2;
    else if (currentInfo == "3")
      com=3;
  }
      else
      com=-1;
}
void BLE_send(String str)
{
  my_Serial.println(str);
}

